#ifndef CENTRALTABDRAGPROXY_H
#define CENTRALTABDRAGPROXY_H

#include "BaseDragProxy.h"

class CentralTabWidget;
class MainWindow;
class CentralTab;

class CentralTabDragProxy : public BaseDragProxy {
    Q_OBJECT
public:
    explicit CentralTabDragProxy(QObject *parent = nullptr);
    CentralTabDragProxy(CentralTabWidget *tabs, QObject *parent = nullptr);
    ~CentralTabDragProxy();

public:
    CentralTabWidget *tabWidget() const;
    void setTabWidget(CentralTabWidget *tabWidget);

protected:
    CentralTabWidget *m_tabs;
    MainWindow *m_window;

    bool eventFilter(QObject *obj, QEvent *event) override;

private:
    void handleTabDragPrepare(int index, const QPoint &pos, const QPixmap &pixmap);
    void handleTabDragStart(int index);
    void handleTabDragFinish(int index, const QPoint &pos, bool change);
    void handleTabDragBlank(int index, const QPoint &pos);
    void handleTabDragIn(CentralTab *tab);

signals:
};

#endif // CENTRALTABDRAGPROXY_H
